package com.qa.dom.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author cxj
 * @since 2018-04-24
 */
public class Orderform extends Model<Orderform> {

    private static final long serialVersionUID = 1L;



	@TableField("id")  //订单号
    private  String ordernum;

	public String getOrdernum() {
		return ordernum;
	}

	public void setOrdernum(String ordernum) {
		this.ordernum = ordernum;
	}

	private String paystatus; // 订单状态

	public String getPaystatus() {
		return paystatus;
	}

	public void setPaystatus(String paystatus) {
		this.paystatus = paystatus;
	}

	/**
     * 主键订单id(订单号)
     */
	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 套餐id
     */
	@TableField("packagetable_id")
	private Integer packagetableId;
    /**
     * 剩余时长
     */
	@TableField("shengyu_time")
	private Float shengyuTime;
    /**
     * 到期时间
     */
	@TableField("daoqi_time")
	private Date daoqiTime;
    /**
     * 实际付款
     */
	@TableField("actual_pay")
	private Float actualPay;
    /**
     * 用户ID
     */
	@TableField("user_id")
	private Integer userId;
    /**
     * 订单创建时间（购买日期）
     */
	@TableField("create_time")
	private Date createTime;

	@TableField(exist=false)
	private Usertable usertable;

	public Usertable getUsertable() {
		return usertable;
	}

	public void setUsertable(Usertable usertable) {
		this.usertable = usertable;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getPackagetableId() {
		return packagetableId;
	}

	public void setPackagetableId(Integer packagetableId) {
		this.packagetableId = packagetableId;
	}

	public Float getShengyuTime() {
		return shengyuTime;
	}

	public void setShengyuTime(Float shengyuTime) {
		this.shengyuTime = shengyuTime;
	}
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	public Date getDaoqiTime() {
		return daoqiTime;
	}

	public void setDaoqiTime(Date daoqiTime) {
		this.daoqiTime = daoqiTime;
	}

	public Float getActualPay() {
		return actualPay;
	}

	public void setActualPay(Float actualPay) {
		this.actualPay = actualPay;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Orderform{" +
			", id=" + id +
			", packagetableId=" + packagetableId +
			", shengyuTime=" + shengyuTime +
			", daoqiTime=" + daoqiTime +
			", actualPay=" + actualPay +
			", userId=" + userId +
			", createTime=" + createTime +
			"}";
	}
}
